<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        /*TODO:引用类型
            String Number Boolean
        */
        //let str1 = "hello"; // 原始类型  string
        // alert(str1 + " : "+typeof str1);

        //let str2 = new String("hello1"); // object
        //alert(str2 + " : "+typeof  str2);

        /**
         String Number Boolean : 引用类型 object
         string number boolean是伪对象,伪对象可以直接使用对应对象的属性和方法
         */
        // 原始类型
        let str = "hello";
        let num = 18;
        let flag = true;
        document.write(typeof str+" <br/> ");
        document.write(typeof num+" <br/> ");
        document.write(typeof flag+" <br/> ");
        document.write(str.length+" <br/> ");
        // 对应的引用类型
        let str1 = new String("hello");
        let num1 = new Number(21);
        let flag1 = new Boolean(false);
        document.write(typeof str1+" <br/> ");
        document.write(typeof num1+" <br/> ");
        document.write(typeof flag1+" <br/> ");

    </script>
</head>
<body>

</body>
</html>